package com.sgcc.pda.hw;

import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * Author：闫亚锋
 * Date: 2016/4/28
 * Time: 12:39.
 * 电能表权限记录实体
 */
public class MeterAuthorityInfo implements Parcelable {
    /**保护码索引*/
    @JSONField(name = "CODE_IDX")
    private String CODE_IDX;

    /**
     * 获保护码索引
     * @return  返回保护码索引
     */
    public String getCODE_IDX() {
        return CODE_IDX;
    }

    /**
     * 设置保护码索引
     * @param CODE_IDX  保护码索引
     */
    public void setCODE_IDX(String CODE_IDX) {
        this.CODE_IDX = CODE_IDX;
    }

    /**
     * 获取权限记录数
     * @return 权限记录数
     */
    public String getAUTH_NUM() {
        return AUTH_NUM;
    }

    /**
     * 设置  权限记录数
     * @param AUTH_NUM  权限记录数
     */
    public void setAUTH_NUM(String AUTH_NUM) {
        this.AUTH_NUM = AUTH_NUM;
    }

    /**
     * 获取分散因子
     * @return 分散因子
     */
    public String getDIS_FACTOR() {
        return DIS_FACTOR;
    }

    /**
     * 设置分散因子
     * @param DIS_FACTOR  分散因子
     */
    public void setDIS_FACTOR(String DIS_FACTOR) {
        this.DIS_FACTOR = DIS_FACTOR;
    }

    /**
     * 获取权限类型
     * @return   权限类型
     */
    public String getAUTH_TYPE() {
        return AUTH_TYPE;
    }

    /**
     * 设置权限类型
     * @param AUTH_TYPE  权限类型
     */
    public void setAUTH_TYPE(String AUTH_TYPE) {
        this.AUTH_TYPE = AUTH_TYPE;
    }

    /**
     * 获取保留字段
     * @return  保留字段
     */
    public String getPERSIST() {
        return PERSIST;
    }

    /**
     * 设置保留字段
     * @param PERSIST   保留字段
     */
    public void setPERSIST(String PERSIST) {
        this.PERSIST = PERSIST;
    }

    /**
     * 获取索引目录
     * @return  索引目录
     */
    public String getIDX() {
        return IDX;
    }

    /**
     * 设置
     * @param IDX
     */
    public void setIDX(String IDX) {
        this.IDX = IDX;
    }

    /**
     * 获取权限索引
     * @return  权限索引
     */
    public String getAUTH_IDX() {
        return AUTH_IDX;
    }

    /**
     * 设置权限索引
     * @param AUTH_IDX  权限索引
     */
    public void setAUTH_IDX(String AUTH_IDX) {
        this.AUTH_IDX = AUTH_IDX;
    }

    /**
     * 获取权限数据
     * @return  权限数据
     */
    public String getAUTH_DATA() {
        return AUTH_DATA;
    }

    /**
     * 设置权限数据
     * @param AUTH_DATA
     */
    public void setAUTH_DATA(String AUTH_DATA) {
        this.AUTH_DATA = AUTH_DATA;
    }

    /**
     * 获取保护码
     * @return  保护码
     */
    public String getCODE() {
        return CODE;
    }

    /**
     * 设置保护码
     * @param CODE  保护码
     */
    public void setCODE(String CODE) {
        this.CODE = CODE;
    }
    /**权限记录数*/
    @JSONField(name = "AUTH_NUM")
    private String AUTH_NUM;
    /**分散因子*/
    @JSONField(name = "DIS_FACTOR")
    private String DIS_FACTOR;
    /**权限类型*/
    @JSONField(name = "AUTH_TYPE")
    private String AUTH_TYPE;
    /**保留*/
    @JSONField(name = "PERSIST")
    private String PERSIST;
    /**索引目录*/
    @JSONField(name = "IDX")
    private String IDX;
    /**权限索引*/
    @JSONField(name = "AUTH_IDX")
    private String AUTH_IDX;
    /**权限数据*/
    @JSONField(name = "AUTH_DATA")
    private String AUTH_DATA;
    /**保护码*/
    @JSONField(name = "CODE")
    private String CODE;

    //698协商密钥包
    @JSONField(name = "KEY")
    private String KEY;
    //698密钥标识
    @JSONField(name = "KEY_TYPE")
    private String KEY_TYPE;

    public MeterAuthorityInfo() {
    }

    public String getKEY() {
        return KEY;
    }

    public void setKEY(String KEY) {
        this.KEY = KEY;
    }

    public String getKEY_TYPE() {
        return KEY_TYPE;
    }

    public void setKEY_TYPE(String KEY_TYPE) {
        this.KEY_TYPE = KEY_TYPE;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.CODE_IDX);
        dest.writeString(this.AUTH_NUM);
        dest.writeString(this.DIS_FACTOR);
        dest.writeString(this.AUTH_TYPE);
        dest.writeString(this.PERSIST);
        dest.writeString(this.IDX);
        dest.writeString(this.AUTH_IDX);
        dest.writeString(this.AUTH_DATA);
        dest.writeString(this.CODE);
        dest.writeString(this.KEY);
        dest.writeString(this.KEY_TYPE);
    }

    private MeterAuthorityInfo(Parcel in) {
        this.CODE_IDX = in.readString();
        this.AUTH_NUM = in.readString();
        this.DIS_FACTOR = in.readString();
        this.AUTH_TYPE = in.readString();
        this.PERSIST = in.readString();
        this.IDX = in.readString();
        this.AUTH_IDX = in.readString();
        this.AUTH_DATA = in.readString();
        this.CODE = in.readString();
        this.KEY = in.readString();
        this.KEY_TYPE = in.readString();
    }

    public static final Creator<MeterAuthorityInfo> CREATOR = new Creator<MeterAuthorityInfo>() {
        @Override
        public MeterAuthorityInfo createFromParcel(Parcel source) {
            return new MeterAuthorityInfo(source);
        }

        @Override
        public MeterAuthorityInfo[] newArray(int size) {
            return new MeterAuthorityInfo[size];
        }
    };
}
